Improve indexer resilience for Redis outages, branch renames, and deleted repos#17
Merged
aanogueira merged 1 commit intomainfrom Apr 17, 2026
Conversation
3663d2b to
598c799
Compare
…nd deleted repos The indexer would hang indefinitely when Redis became unreachable, silently mark repos as empty when their default branch was renamed, and waste retries on repos deleted from the code host. Redis outage recovery: - Worker exits after ~5 min of consecutive Redis failures so K8s restarts - CleanupOldJobs now removes ghost entries from running/pending status indexes, type indexes, and processing set - DequeueForShard cleans up ghost job index entries on pop Branch rename detection: - processIndexJob auto-detects the actual default branch when configured branch doesn't exist (prefers main > master > first available) - Updates the database so future jobs use the correct branch Deleted repo detection: - Add PermanentError type to skip retries on unrecoverable failures - Detect 404/not-found git errors during clone/fetch - Mark deleted repos as excluded immediately instead of retrying 3 times - New repo_not_found category in failure metrics Other: - Set fsGroupChangePolicy: OnRootMismatch to speed up pod restarts - golines formatting fixes Signed-off-by: Andre Nogueira <aanogueira@protonmail.com> Signed-off-by: Andre Nogueira <andre.nogueira@mollie.com>
598c799 to
767c0fb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The indexer would hang indefinitely when Redis became unreachable, silently mark repos as empty when their default branch was renamed, and waste retries on repos deleted from the code host.
Redis outage recovery:
Branch rename detection:
Deleted repo detection:
Other: